<template>
	<view>
		
		<textarea v-model="value" name="" id="" cols="30" rows="10" placeholder="请输入内容"></textarea>
		<view class="image-list">
			<image :src="item.tempFilePath" mode="" v-for="(item, index) in files" :key="index"></image>
		</view>

		<button @click="handleClick">+</button>
		<button type="primary" :disabled="!value.length" @click="toDis">下一步</button>
	</view>
</template>

<script setup>
	import {
		ref
	} from 'vue';
	const files = ref([])
	const value = ref('')
	const toDis = () => {
		uni.navigateTo({
			url: '/pages/diseaseList/list'
		})
	}
	const handleClick = () => {
		uni.chooseMedia({
			success: resp => {
				console.log(resp.tempFiles)
				files.value = resp.tempFiles
			}
		})
	}
</script>

<style lang="scss">
.image-list {
	display: flex;
	justify-content: space-around;
	flex-wrap: wrap;
	image {
		width: 23%;
		height: 200rpx;
	}
}
</style>